<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - iris.info - kernel/link.h</title>
  <link rel="stylesheet" type="text/css" href="../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../index.html">directory</a> - <a href="index.html">kernel</a> - link.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>iris.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-05-24</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">1</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">0.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">0</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : #ifndef __LINK_H__
<span class="lineNum">       2 </span>                : #define __LINK_H__
<span class="lineNum">       3 </span>                : 
<span class="lineNum">       4 </span>                : #include &quot;simulator.h&quot;
<span class="lineNum">       5 </span>                : #include &lt;list&gt;
<span class="lineNum">       6 </span>                : #include &lt;iostream&gt;
<span class="lineNum">       7 </span>                : 
<span class="lineNum">       8 </span>                : using namespace std;
<span class="lineNum">       9 </span>                : 
<span class="lineNum">      10 </span>                : class OutputBase
<span class="lineNum">      11 </span>                : {
<span class="lineNum">      12 </span>                :  public:
<span class="lineNum">      13 </span><span class="lineNoCov">              0 :   OutputBase(int ID, double l) : componentId(ID), latency(l){}</span>
<span class="lineNum">      14 </span>                :     virtual void CallHandler(uint64_t, int) = 0;
<span class="lineNum">      15 </span>                :     int componentId;
<span class="lineNum">      16 </span>                :     double latency;
<span class="lineNum">      17 </span>                : };
<span class="lineNum">      18 </span>                : 
<span class="lineNum">      19 </span>                : template&lt;typename OBJ&gt;
<span class="lineNum">      20 </span>                :   class Output0 : public OutputBase
<span class="lineNum">      21 </span>                : {
<span class="lineNum">      22 </span>                :  public:
<span class="lineNum">      23 </span>                :   Output0(int componentId, double l, void (OBJ::*f)(uint64_t, int), OBJ* obj0)
<span class="lineNum">      24 </span>                :     : OutputBase(componentId, l), handler(f), obj(obj0){}
<span class="lineNum">      25 </span>                :     void (OBJ::*handler)(uint64_t, int);
<span class="lineNum">      26 </span>                :     OBJ* obj;
<span class="lineNum">      27 </span>                :     void CallHandler(uint64_t data, int src)
<span class="lineNum">      28 </span>                :     {
<span class="lineNum">      29 </span>                :       //cout&lt;&lt;&quot;In Output0 handler&quot;&lt;&lt;endl;
<span class="lineNum">      30 </span>                :       (obj-&gt;*handler)(data, src);
<span class="lineNum">      31 </span>                :     }
<span class="lineNum">      32 </span>                : };
<span class="lineNum">      33 </span>                : 
<span class="lineNum">      34 </span>                : class Link
<span class="lineNum">      35 </span>                : {
<span class="lineNum">      36 </span>                :  public:
<span class="lineNum">      37 </span>                : 
<span class="lineNum">      38 </span>                :   int src;
<span class="lineNum">      39 </span>                :   int width;
<span class="lineNum">      40 </span>                : 
<span class="lineNum">      41 </span>                :   list&lt;OutputBase*&gt; outputs;
<span class="lineNum">      42 </span>                :   Link(int srcComponentId, int linkWidth);
<span class="lineNum">      43 </span>                : 
<span class="lineNum">      44 </span>                :   void Send(uint64_t data, int srcComponentId);  
<span class="lineNum">      45 </span>                : };
<span class="lineNum">      46 </span>                : 
<span class="lineNum">      47 </span>                :  template&lt;typename OBJ&gt;
<span class="lineNum">      48 </span>                :  void addOutput(Link* l, int outComponent, double latency, 
<span class="lineNum">      49 </span>                :                    void (OBJ::*f)(uint64_t, int), OBJ* obj0)
<span class="lineNum">      50 </span>                :   {
<span class="lineNum">      51 </span>                :     OutputBase* temp = new Output0&lt;OBJ&gt;(outComponent, latency, f, obj0);
<span class="lineNum">      52 </span>                :     l-&gt;outputs.push_back(temp);
<span class="lineNum">      53 </span>                :   }
<span class="lineNum">      54 </span>                : #endif
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
